package cxf.spring.demo.service;

import cxf.spring.demo.domain.user.User;
import cxf.spring.demo.domain.user.UserList;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 * User creating and information service
 * <p/>
 * User: Vlad Vinichenko (akerigan@gmail.com)
 * Date: 06.03.2009
 * Time: 20:18:18
 */
@WebService(name = "user")
public interface UserService {

    /**
     * Get information about user
     *
     * @param login User login
     * @return Information about user
     * @throws Exception
     */
    @WebMethod(operationName = "info")
    public User getInfo(
            @WebParam(name = "login") String login
    ) throws Exception;

    /**
     * Update information about user
     *
     * @param user Information about user
     * @throws Exception
     */
    @WebMethod(operationName = "update")
    public void updateInfo(
            @WebParam(name = "user") User user
    ) throws Exception;

    /**
     * Get users logins list
     *
     * @return
     * @throws Exception
     */
    @WebMethod(operationName = "view-logins")
    public UserList getUserList() throws Exception;

}
